<?php 
/**
 * @version		2.0.1 | $Id: form.php 106 2009-08-30 18:03:21Z mwi.nor $
 */

// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col100">
    <fieldset class="adminform">
        <legend><?php echo JText::_( 'MD_MATCH_DETAILS' ); ?></legend>
        <table class="admintable">
        <tr>
            <td width="100" align="right" class="key">
                <label for="MatchEventID">
                <?php echo JText::_( 'MD_MATCH_EVENT' ); ?>
                </label>
            </td>
            <td>
                <?php echo $this->eventselect ?>
            </td>
		</tr>
        <tr>
            <td width="100" align="right" class="key">
                <label for="MatchSeasonID">
                <?php echo JText::_( 'MD_MATCH_SEASON' ); ?>
                </label>
            </td>
            <td>
                <?php echo $this->seasonselect ?>
            </td>
		</tr>
        <tr>
            <td width="100" align="right" class="key">
                <label for="MatchVenueID">
                <?php echo JText::_( 'MD_MATCH_VENUE' ); ?>
                </label>
            </td>
            <td>
                <?php echo $this->venueselect ?>
            </td>
		</tr>
        <tr>
            <td width="100" align="right" class="key">
                <label for="MatchDate">
                <?php echo JText::_( 'MD_MATCH_DATE' ); ?>
                </label>
            </td>
            <td>
                <?php echo $this->calendar ?>
            </td>
		</tr>
		<?php if ($this->eventdata->EventUseTeams == 1) : ?>
        <tr>
            <td width="100" align="right" class="key">
                <label for="MatchHomeTeam">
                <?php echo JText::_( 'MD_MATCH_HOME_TEAM' ); ?>
                </label>
            </td>
            <td>
                <?php echo $this->hometeamselect ?>
            </td>
		</tr>
        <tr>
            <td width="100" align="right" class="key">
                <label for="MatchAwayTeam">
                <?php echo JText::_( 'MD_MATCH_AWAY_TEAM' ); ?>
                </label>
            </td>
            <td>
                <?php echo $this->awayteamselect ?>
            </td>
		</tr>
		<?php endif; ?>
		<?php if ($this->eventdata->EventUsePlayoffs == 1) : ?>
        <tr>
            <td width="100" align="right" class="key">
                <label for="MatchType">
                <?php echo JText::_( 'MD_MATCH_TYPE' ); ?>
                </label>
            </td>
            <td>
                <?php echo $this->matchTypeSelect ?>
            </td>
		</tr>
		<?php endif; ?>
        </table>
        <table  class="adminlist">
        <thead>
		   <tr>
			<th align="left" valign="middle"><b><?php echo JText::_( 'MD_MATCH_HOME' ); ?></b></th>
		    <th align="center" valign="middle"><b><?php echo ($this->eventdata->EventUseSets == 1) ? JText::_( 'MD_MATCH_TBL_SETS' ) : '&nbsp;'; ?></b></th>
		    <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_LEGS' ); ?></b></th>
		    <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_BONUSPOINTS' ); ?></b></th>
		    <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_180' ); ?></b></th>
		    <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_HC' ); ?></b></th>
		  	<th width="20">&nbsp;</th>
		  	<th align="left" valign="middle"><b><?php echo JText::_( 'MD_MATCH_AWAY' ); ?></b></th>
		    <th align="center" valign="middle"><b><?php echo ($this->eventdata->EventUseSets == 1) ? JText::_( 'MD_MATCH_TBL_SETS' ) : '&nbsp;'; ?></b></th>
		    <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_LEGS' ); ?></b></th>
		    <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_BONUSPOINTS' ); ?></b></th>
		  	<th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_180' ); ?></b></th>
		  	<th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_HC' ); ?></b></th>
		   </tr>
		 </thead>
		   <tr>
			  <td align="left" valign="middle">
                <?php echo $this->homePlayerSelect ?>
			  </td>
				  <td align="left" valign="middle">
	            <?php if ($this->eventdata->EventUseSets == 1) : ?>
				  	<input class="text_area" type="text" name="MatchHomeSets" id="MatchHomeSets" size="4" value="<?php echo $this->match->MatchHomeSets;?>" />
		    	<?php endif; ?>
				  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHomeLegs" id="MatchHomeLegs" size="4" value="<?php echo $this->match->MatchHomeLegs;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHomeBonus" id="MatchHomeBonus" size="4" value="<?php echo $this->match->MatchHomeBonus;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHome180" id="MatchHome180" size="4" value="<?php echo $this->match->MatchHome180;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHomeHC" id="MatchHomeHC" size="4" value="<?php echo $this->match->MatchHomeHC;?>" />
			  </td>
		  	  <td width="50">&nbsp;</td>
			  <td align="left" valign="middle">
                <?php echo $this->awayPlayerSelect ?>
			  </td>
			  <td align="left" valign="middle">
            <?php if ($this->eventdata->EventUseSets == 1) : ?>
			  	<input class="text_area" type="text" name="MatchAwaySets" id="MatchAwaySets" size="4" value="<?php echo $this->match->MatchAwaySets;?>" />
		    	<?php endif; ?>
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAwayLegs" id="MatchAwayLegs" size="4" value="<?php echo $this->match->MatchAwayLegs;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAwayBonus" id="MatchAwayBonus" size="4" value="<?php echo $this->match->MatchAwayBonus;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAway180" id="MatchAway180" size="4" value="<?php echo $this->match->MatchAway180;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAwayHC" id="MatchAwayHC" size="4" value="<?php echo $this->match->MatchAwayHC;?>" />
			  </td>
		    </tr>
        <?php if ($this->eventdata->EventUseXStats == 1) : ?>
        <thead>
		   <tr>
			  <th align="left" valign="middle">&nbsp;</th>
		      <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_AVG1' ); ?></b></th>
		      <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_AVG3' ); ?></b></th>
		      <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_LWAT' ); ?></b></th>
		  	  <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_100' ); ?></b></th>
		  	  <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_140' ); ?></b></th>
		  	  <th width="50">&nbsp;</th>
			  <th align="left" valign="middle">&nbsp;</th>
		      <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_AVG1' ); ?></b></th>
		      <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_AVG3' ); ?></b></th>
		      <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_LWAT' ); ?></b></th>
		  	  <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_100' ); ?></b></th>
		  	  <th align="center" valign="middle"><b><?php echo JText::_( 'MD_MATCH_TBL_140' ); ?></b></th>
		    </tr>
		 </thead>
		   <tr>
			  <td align="left" valign="middle">
			  	&nbsp;
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHomeAVG1" id="MatchHomeAVG1" size="4" value="<?php echo $this->match->MatchHomeAVG1;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHomeAVG3" id="MatchHomeAVG3" size="4" value="<?php echo $this->match->MatchHomeAVG3;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHomeLWAT" id="MatchHomeLWAT" size="4" value="<?php echo $this->match->MatchHomeLWAT;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHome100" id="MatchHome100" size="4" value="<?php echo $this->match->MatchHome100;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchHome140" id="MatchHome140" size="4" value="<?php echo $this->match->MatchHome140;?>" />
			  </td>
		  	  <td width="50">&nbsp;</td>
			  <td align="left" valign="middle">
			  	&nbsp;
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAwayAVG1" id="MatchAwayAVG1" size="4" value="<?php echo $this->match->MatchAwayAVG1;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAwayAVG3" id="MatchAwayAVG3" size="4" value="<?php echo $this->match->MatchAwayAVG3;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAwayLWAT" id="MatchAwayLWAT" size="4" value="<?php echo $this->match->MatchAwayLWAT;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAway100" id="MatchAway100" size="4" value="<?php echo $this->match->MatchAway100;?>" />
			  </td>
			  <td align="left" valign="middle">
			  	<input class="text_area" type="text" name="MatchAway140" id="MatchAway140" size="4" value="<?php echo $this->match->MatchAway140;?>" />
			  </td>
		  	 </tr>
		 <?php endif; ?>
        </table>
    </fieldset>
</div>

<div class="clr"></div>

<input type="hidden" name="option" value="com_matchdart" />
<input type="hidden" name="cid" value="<?php echo $this->match->MatchID; ?>" />
<input type="hidden" name="task" value="edit" />
<input type="hidden" name="controller" value="matches" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>